<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="/iuie-tag"%>
<%@ taglib prefix="sys" uri="/sys-tag" %>
<%@ taglib prefix="lui" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>角色的用户设置</title>
</head>
<lui:context/>
<u:View basePath="/res-system/role" userJS="roleUserSetting" delayLoadJs="false">
<body>
    <lui:dialogBody>
        <form class="m-cust m-narrow" id='roleUserSettingFrm'>
        	<div class="form-group m-narrow">
			    <table class="m-composing m-full-width m-margin-0">
				    <tr>
				        <td>角色</td>
				        <td><input class="m-input" readonly="readonly" value="${requestScope.roleName }"></td>
				    </tr>
				</table>
			</div>
			<div class="form-group m-narrow">
	        	<lui:ajax url="${ctx }/setting/template/find/all" id="availableDataAjax" autoSend="false"/>
				<lui:ajax url="${ctx }/setting/template/find/roleId/${requestScope.roleId }" id="selectedDataAjax" autoSend="false"/>
				<lui:mutiSelect textDefine="resName" valueDefine="resId" ajaxAvailable="availableDataAjax" id="msgSel" ajaxSelected="selectedDataAjax"
				    showHeader="true" availableHeaderName="可选择的" selectedHeaderName="已选择的" name="resIdArr"/>
				<lui:ajax id="roleUserSettingSaveAjax" url="${ctx }/setting/template/save/roleWithUserSetting/${requestScope.roleId }"
					onSuccess="RoleUserSettingPage.onSaveSucc" type="post" contentType="application/x-www-form-urlencoded"/>
			</div>
        </form>
    </lui:dialogBody>
    <lui:dialogFooter>
       <button class="btn btn-primary m-btn" type="button" onclick="RoleUserSettingPage.save()">保存</button>
       <button class="btn btn-default m-btn" type="button" data-dismiss="dialog-box">关闭</button>
    </lui:dialogFooter>
</body>
</u:View>
</html>